home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / prg_casm / jlvesa11.zip / JLVESA18.ASM < prev    next >
Assembly Source File  |  1995-11-14  |  1KB  |  65 lines

  1. ; This file is part of JLVESA-library
  2. ;
  3. ; Copyright 1994 Johannes Lehtinen
  4. ; All rights reserved
  5.  
  6. model large,c
  7. p386
  8.  
  9. include "jlvesads.asm"
  10.  
  11. segment jlvesa18_TEXT USE16 'CODE'
  12. assume cs:jlvesa18_TEXT
  13.  
  14. ; int JVScreen_SetLogicalWidth(JVUWord lwidth)
  15. ;
  16. ; Sets logical scan line width. Returns scan line length after set. If desirable
  17. ; width is not achievable, next larger width will be used. Returns 0 if function
  18. ; is not supported!
  19.  
  20. proc JVScreen_SetLogicalWidth far
  21.    public JVScreen_SetLogicalWidth
  22.  
  23.    push  bp
  24.    mov   bp,sp
  25.    push  ds
  26.  
  27.    ; Set DS to point to data segment
  28.  
  29.    mov   ax,JLVesa_Data
  30.    mov   ds,ax
  31.  
  32.    ; Call logical width set routine
  33.  
  34.    mov   ax,4f06H
  35.    mov   bl,0
  36.    mov   cx,[ss:bp+6]
  37.    int   10H
  38.  
  39.    ; Check if function supported
  40.  
  41.    cmp   al,4fH
  42.    jne   short not_supported
  43.  
  44.    ; Return with new width
  45.  
  46.    mov   [ds:LWidth],cx
  47.    mov   ax,cx
  48.    pop   ds
  49.    pop   bp
  50.    retf
  51.  
  52.    ; Return 0 if not supported
  53.  
  54. not_supported:
  55.    pop   ds
  56.    pop   bp
  57.    xor   ax,ax
  58.    retf
  59.  
  60. endp JVScreen_SetLogicalWidth
  61.  
  62. ends
  63.  
  64. end
  65.